Transfer

This assignment accepts allocation instructions with methods of percent, amount and units. All methods can be the same or mixed. Negative allocations represent removals and positive allocations represent additions. The total of removals must match the total of additions. If deposits are tracked, seed deposit tracking is maintained throughout the Transfer.

  1. Set the assignment’s “MoneyType value” to the sum total of the MoneyType values.
  2. Separately order negative allocation funds and positive allocation funds.
  3. For each negative fund allocation,
    1. If the allocation method is percent,
      • Calculate the fund’s “removal amount” as the allocation percent X the fund’s cash value. Round the result to the currency definition.
    2. If the allocation method is units,
      • Calculate the fund’s “removal amount” as the allocation units X the effective date’s unit value. Round the result to the currency definition.
    3. If the allocation method is amount,
      • Set the fund’s “removal amount” as the allocation amount.
    4. Accumulate the “removal amount”.
  4. For each fund’s removal amount created above,
    1. If NetTransfer is “Yes”,
      1. If the fund has a positive allocation,
        1. Calculate the fund’s “retained amount” as the accumulated “removal amount” X the positive allocation percent. Round the result to the currency definition.
        2. If the last fund, adjust “retained amount” so that the sum of “retained amounts” equals the accumulated “removal amount”.
        3. Recalculate the fund’s “removal amount” as the difference between the original “removal amount” and the “retained amount”.
        4. Remove the positive fund allocation from the list.
    2. If tracking funds by deposit,
      1. “Remaining removal amount” is set to the fund’s “removal amount”.
      2. For each deposit in FIFO or LIFO order,
        1. Calculate “deposit removal’ as the lesser of the deposit’s value and the fund’s “removal amount”.
        2. Decrement the “remaining removal amount” by the “deposit removal”.
        3. If the “remaining removal amount” is 0, looping through the deposits is complete.
        4. For each positive allocation fund,
          1. If the allocation method is percent,
            1. Calculate “added amount” as allocation percent X “deposit removal”. Round the result to the currency definition.
            2. The last positive fund allocation is adjusted so the sum of the “added amount” values equals the “deposit removal”.
    3. Otherwise, for each positive allocation fund,
      1. If the allocation method is percent,
        1. Calculate “added amount” as allocation percent X “removal amount”. Round the result to the currency definition.
        2. The last fund is adjusted so the sum of the “added amount” values equals the “deposit removal”.
    4. Each “added amount” generates a potential DepositValuationEffect record and DepositValue record.
  5. If tracking funds by deposit,
    1. For each removal amount from a deposit,
      1. A DepositValuationEffect record persists the amount of change in a fund’s value and maintains tracking by seed deposit, money type code and deposit date in the fund.
        1. If the fund is variable and the cash value of the remaining units is less than the smallest denomination of the currency, remove all units.
        2. Where removal records contain the same seed deposit, money type code and deposit date for the same fund, records are consolidated.
    2. For each "added amount",
      1. A DepositValuationEffect record persists the amount of change in a fund’s value and maintains tracking by seed deposit, money type code and the activity’s effective date (new deposit date).
        1. Where new deposit records contain the same seed deposit and money type code for the same fund, records are consolidated.
    3. An ending DepositValue record is created to reflect the ending balances of the deposit's CashValue, RawCashValue and Units.
      1. An ending record will exist for every beginning DepositValue record and each new deposit added by the activity.
      2. The difference between beginning and ending record values is the accumulation of changes persisted in DepositValuationEffect records for the same fund, seed deposit, money type code and deposit date.
    4. An ending FundValue record is created to reflect the ending balances of the fund's CashValue, RawCashValue and Units.
      1. If rounding level is deposit, CashValue is the sum of rounded cash value from the fund's ending DepositValue records.
      2. If rounding level is fund, CashValue is the sum of unrounded cash value from the fund's ending DepositValue records. The result is rounded to currency definition.
      3. Units and RawCashValue are the sum of the units and raw cash values, respectively, from the fund's ending DepositValue records.
  6. If not tracking funds by deposit,
    1. For each removal amount from a fund,
      1. A FundValuationEffect record persists the amount of change in a fund’s value.
        1. If the fund is variable and the cash value of the remaining units is less than the smallest denomination of the currency, remove all units.
      2. Ending FundValue records are created from every beginning FundValue record with the FundValuationEffect record generating a difference between the two FundValue records.
    2. For each "added amount",
      1. A FundValuationEffect record persists the amount of change in a fund’s value.
    3. An ending FundValue record is created to reflect the fund's ending balances.
      1. An ending record will exist for every beginning FundValue record and for each new investment position added by the activity.
      2. The difference between beginning and ending record values is the accumulation of the fund's changes persisted in FundValuationEffect records.